package com.bwie.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @description :
 * @Author QiHainan
 * @Create 2025/3/28 15:22
 * @Version 1.0
 */
@Configuration
public class KafkaConfig {

    public static final String TOPIC_TEST = "topic-test";
    public static final String TOPIC_LOG = "topic-log";

    /**
     * 创建测试主题
     * @return
     */
    @Bean
    public NewTopic testTopic(){
        return new NewTopic(TOPIC_TEST,1, (short) 1);
    }

    /**
     * 驳回发送
     * @return
     */
    @Bean
    public NewTopic logTopic(){
        return new NewTopic(TOPIC_LOG,1, (short) 1);
    }
}
